<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="/taglib" prefix="sdc"%>

<jsp:include page="/jsp/layout/cabecalho.jsp" flush="true"></jsp:include>
<jsp:include page="/jsp/layout/menu.jsp" flush="true"></jsp:include>

<div id="box_principal">
	<div id="box_top">&nbsp;</div>
	<div id="box_titulo">
		<font class="titulo">
			<b><fmt:message key="acessos.titulo"/></b>
		</font>
	</div>
	<div id="box_form">
		<table border="0" align="center" id="acessos">
			<form action="/SDC/RelatoriosServlet" method="post">
				<tr style="font-size: 16px; background-color: gray;">
					<td><input name="data_inicio" id="data_inicio"></input></td>
					<td><input name="data_fim" id="data_fim"></input></td>
					<td colspan="2" align="center"><input type="submit" value="Pesquisar"></input></td>
				</tr>
			</form>
			<tr style='font-size: 16px; background-color: gray;'>
	 			<td align='center'>Nome</td>
	 			<td align='center'>Usuario</td>
	 			<td align='center'>Ultimo Acesso</td>
	 			<td align='center'>Qtde Acesso</td>
			</tr>
			<c:forEach items="${acessosByUsuario}" var="acesso">
				<tr>
					<td><c:out default="Não encontrado"  value="${acesso.nome}" /></td>
					<td><c:out default="0" value="${acesso.usuario}" /></td>
					<td align='center'><c:out default="Não encontrado"  value="${acesso.ultimo_login}" /></td>
					<td align='center'><c:out default="Não encontrado"  value="${acesso.qtdeAcessos}" /></td>

				</tr>
			</c:forEach>
			<tr>
				<td align="center" scope="row">&nbsp;</td>
				<td colspan="5" align="center"></td>
			</tr>
			<tr align="center">
				<td colspan="5">Resultados [${fn:length(acessosByUsuario)}]</td>
			</tr>
		</table>
	</div>
	<div id="box_bottom">&nbsp;</div>
</div>
<jsp:include page="/jsp/layout/rodape.jsp" flush="true"/>
